import request from '@/utils/request'

// 查询推送记录列表
export function listRec(query) {
  return request({
    url: '/out/recV2/list',
    method: 'get',
    params: query
  })
}

// 查询推送记录详细
export function getRec(id) {
  return request({
    url: '/out/recV2/' + id,
    method: 'get'
  })
}

// 新增推送记录
export function addRec(data) {
  return request({
    url: '/out/recV2',
    method: 'post',
    data: data
  })
}

// 修改推送记录
export function updateRec(data) {
  return request({
    url: '/out/recV2',
    method: 'put',
    data: data
  })
}

// 删除推送记录
export function delRec(saleCode) {
  return request({
    url: '/out/recV2/' + saleCode,
    method: 'delete'
  })
}

// 删除推送记录-新
export function delRecNew(saleCode) {
  return request({
    url: '/out/recV2/delAllOut?saleCode=' + saleCode,
    method: 'get'
  })
}

// 导出推送记录
export function exportRec(query) {
  return request({
    url: '/out/recV2/export',
    method: 'get',
    params: query
  })
}
